﻿
namespace KharaPos.Web.Entities
{
    using System;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;


    // The MetadataTypeAttribute identifies BusinessUnitMetadata as the class
    // that carries additional metadata for the BusinessUnit class.
    [MetadataTypeAttribute(typeof(BusinessUnitMetadata))]
    public partial class BusinessUnit
    {

        // This class allows you to attach custom attributes to properties
        // of the BusinessUnit class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class BusinessUnitMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private BusinessUnitMetadata()
            {
            }

            public EntityCollection<CatalogEntry> Catalogs { get; set; }

            public EntityCollection<BusinessUnit> Children { get; set; }

            public int Id { get; set; }

            public string Name { get; set; }

            public BusinessUnit Parent { get; set; }

            public int? ParentId { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CatalogDetailMetadata as the class
    // that carries additional metadata for the CatalogDetail class.
    [MetadataTypeAttribute(typeof(CatalogDetailMetadata))]
    public partial class CatalogDetail
    {

        // This class allows you to attach custom attributes to properties
        // of the CatalogDetail class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CatalogDetailMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CatalogDetailMetadata()
            {
            }

            public CatalogEntry Catalog { get; set; }

            public string CatalogDescription { get; set; }

            public int CatalogId { get; set; }

            public string CatalogName { get; set; }

            public string CatalogShortDescription { get; set; }

            public Category Category { get; set; }

            public int CategoryId { get; set; }

            public int Id { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CatalogEntryMetadata as the class
    // that carries additional metadata for the CatalogEntry class.
    [MetadataTypeAttribute(typeof(CatalogEntry.CatalogEntryMetadata))]
    public partial class CatalogEntry
    {

        // This class allows you to attach custom attributes to properties
        // of the CatalogEntry class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CatalogEntryMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CatalogEntryMetadata()
            {
            }

            public BusinessUnit BusinessUnit { get; set; }

            public int BusinessUnitId { get; set; }

            public DateTime DateAdded { get; set; }

            public DateTime? DateAvailableInternal { get; set; }

            public DateTime? DateAvailablePublic { get; set; }

            public DateTime? DateDiscontinuedExternal { get; set; }

            public DateTime? DateDiscontinuedInternal { get; set; }

            public EntityCollection<CatalogDetail> Details { get; set; }

            public int Id { get; set; }

            public Product Product { get; set; }

            public int ProductId { get; set; }

            public string SKU { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CategoryMetadata as the class
    // that carries additional metadata for the Category class.
    [MetadataTypeAttribute(typeof(Category.CategoryMetadata))]
    public partial class Category
    {

        // This class allows you to attach custom attributes to properties
        // of the Category class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CategoryMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CategoryMetadata()
            {
            }

            public EntityCollection<Category> Children { get; set; }

            public int Id { get; set; }

            public string LongDescription { get; set; }

            public string Name { get; set; }

            public Category Parent { get; set; }

            public Nullable<int> ParentId { get; set; }

            public string ShortDescription { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ManuFacturerMetadata as the class
    // that carries additional metadata for the ManuFacturer class.
    [MetadataTypeAttribute(typeof(ManuFacturer.ManuFacturerMetadata))]
    public partial class ManuFacturer
    {

        // This class allows you to attach custom attributes to properties
        // of the ManuFacturer class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ManuFacturerMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ManuFacturerMetadata()
            {
            }

            public int Id { get; set; }

            public string Name { get; set; }

            public EntityCollection<Product> Products { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ProductMetadata as the class
    // that carries additional metadata for the Product class.
    [MetadataTypeAttribute(typeof(Product.ProductMetadata))]
    public partial class Product
    {

        // This class allows you to attach custom attributes to properties
        // of the Product class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ProductMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ProductMetadata()
            {
            }

            public EntityCollection<CatalogEntry> Catalogs { get; set; }

            public Category CategoryDescription { get; set; }

            public int CategoryId { get; set; }

            public string Description { get; set; }

            public int Id { get; set; }

            public ManuFacturer ManuFacturer { get; set; }

            public int ManufacturerId { get; set; }

            public string Name { get; set; }

            public EntityCollection<ProductSale> ProductSales { get; set; }

            public string ShortDescription { get; set; }

            public EntityCollection<Upc> Upcs { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies ProductSaleMetadata as the class
    // that carries additional metadata for the ProductSale class.
    [MetadataTypeAttribute(typeof(ProductSale.ProductSaleMetadata))]
    public partial class ProductSale
    {

        // This class allows you to attach custom attributes to properties
        // of the ProductSale class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ProductSaleMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ProductSaleMetadata()
            {
            }

            public decimal Cost { get; set; }

            public Product Product { get; set; }

            public int ProductId { get; set; }

            public int Quantity { get; set; }

            public Sale Sale { get; set; }

            public int SaleId { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies SaleMetadata as the class
    // that carries additional metadata for the Sale class.
    [MetadataTypeAttribute(typeof(Sale.SaleMetadata))]
    public partial class Sale
    {

        // This class allows you to attach custom attributes to properties
        // of the Sale class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class SaleMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private SaleMetadata()
            {
            }

            public DateTime DateOfSale { get; set; }

            public int Id { get; set; }

            public EntityCollection<ProductSale> LineItems { get; set; }

            public int RegisterSessionId { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies UpcMetadata as the class
    // that carries additional metadata for the Upc class.
    [MetadataTypeAttribute(typeof(Upc.UpcMetadata))]
    public partial class Upc
    {

        // This class allows you to attach custom attributes to properties
        // of the Upc class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class UpcMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private UpcMetadata()
            {
            }

            public int Id { get; set; }

            public Product Product { get; set; }

            public int ProductId { get; set; }

            public string UpcNumber { get; set; }
        }
    }
}
